module.exports = {
    mode: 'development',
    devtool: 'source-map',
    module: {
        rules: [
            // 不解析 lodash
            // {
            //     test: /\.js$/,
            //     exclude: /lodash/, 
            //     use: "babel-loader"
            // }

            // 缓存
            {
                test: /\.js$/,
                use: [
                {
                    loader: "cache-loader",
                    options:{
                        cacheDirectory: "./cache"
                    }
                },
                "thread-loader",// 多线程处理
                "babel-loader"]
            }
        ]
    }
}